package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CheckItemMapper {

    void add(CheckItem checkItem);

    @Delete("delete from t_checkitem where id = #{id}")
    void deleteById(Integer id);

    List<Integer> findCheckGroupIdsByCheckItemId(Integer checkItemId);


    void update(CheckItem checkItem);


    @Select("select * from t_checkitem")
    List<CheckItem> findAll();


    @Select("select * from t_checkitem where id = #{id}")
    CheckItem findById(Integer id);

    Page<CheckItem> findByCondition(String queryString);

    List<Integer> findCheckItemIdsByCheckGroupId(Integer groupId);
}
